package a1_waittandontify;

import java.util.concurrent.ArrayBlockingQueue;


public class Thread_Demo1 {
    public static void main(String[] args) {
        // 1.创建阻塞队列
        ArrayBlockingQueue<String> queue = new ArrayBlockingQueue<>(1);
        // 2.创建厨师线程
        cook1 cook1 = new cook1(queue);
        // 3.创建吃货线程
        foodie1 foodie1 = new foodie1(queue);
        // 4.启动线程
        cook1.start();
        foodie1.start();
    }
}
